home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / mac / DirectX SDK / DXSDK / samples / Multimedia / Media / shadowbumpshader.psh < prev    next >
Text File  |  2001-10-08  |  659b  |  32 lines

  1. ps.1.1
  2.  
  3. def c2,  0.0f,0.0f,0.0f,1.0f
  4.  
  5. tex t0            // basis map channels 1-4
  6. tex t1            // horizon map channels 1-4
  7. tex t2            // basis map channels 5-8
  8. tex t3            // horizon map channels 5-8
  9.  
  10.     dp3_sat r0.rgb, t0_bx2,t1_bx2    // combine channels 1-3
  11. +    mul_sat r0.a, t0_bx2, t1_bx2    // combine channel 4
  12.     dp3_sat r1.rgb, t2_bx2,t3_bx2    // combine channels 5-7
  13. +    mul_sat r1.a, t2_bx2, t3_bx2    // combine channel 8
  14.     add r1, r0, r1        // sum color channels
  15.     add r0.rgb, r1, r1.a    // sum in alpha channels
  16.     sub_x4 r0.rgb, r0, v0_bx2            // compare with light direction  
  17. //    mov_x4 r0,r0 
  18.   //  mov r0,v0
  19.   
  20.     
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.